<template>
  <div class="viewContain">
    <el-form :model="listQuery" size="small" label-width="100px">
      <el-row>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 8 }" :xl="{ span: 8 }">
          <el-form-item label="用户姓名 :">
            <el-input
              v-model="listQuery.name"
              placeholder="请输入内容"
              clearable
              @keyup.enter.native="handleSearch"
            />
          </el-form-item>
        </el-col>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 8 }" :xl="{ span: 8 }">
          <el-form-item label="起止时间 :">
            <el-date-picker
              v-model="listQuery.time"
              size="small"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              unlink-panels
            />
          </el-form-item>
        </el-col>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 8 }" :xl="{ span: 8 }">
          <el-form-item label="描述 :">
            <el-input
              v-model="listQuery.name"
              placeholder="请输入内容"
              clearable
              @keyup.enter.native="handleSearch"
            />
          </el-form-item>
        </el-col>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 6 }" :xl="{ span: 6 }">
          <el-form-item label="应用名称 :">
            <el-select v-model="listQuery.status" placeholder="请选择" clearable>
              <el-option
                v-for="item in checkResult"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :xs="{ span: 24 }" :sm="{ span: 12 }" :md="{ span: 6 }" :xl="{ span: 6 }">
          <el-form-item>
            <el-button size="mini" type="primary" @click="handleSearch">查询</el-button>
            <el-button size="mini" plain type="primary" @click="handleReload">重置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-table
      ref="table"
      v-loading="loading"
      fit
      stripe
      :data="tableData"
      border
      size="mini"
    >
      <el-table-column type="selection" />
      <el-table-column align="center" label="序号" type="index" width="50">
        <template slot-scope="scope">
          <span>{{ (listQuery.pageNo - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="name" align="center" label="用户姓名" width="150" />
      <el-table-column prop="no" align="center" label="应用名称" width="150" />
      <el-table-column prop="q" align="center" label="描述" />
      <el-table-column prop="w" align="center" label="创建时间" />
      <el-table-column align="center" fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button class="text-button el-button--danger" size="mini" @click="handleDelete(scope)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      loading: false,
      listQuery: {
        pageNo: 1,
        pageSize: 10
      },
      checkResult: [],
      tableData: [
        {
          name: '开发测试',
          no: 'v1.0',
          q: 'enen',
          w: 'sfda'
        }
      ]
    }
  },
  methods: {
    // 查询
    handleSearch() {},
    // 重置
    handleReload() {},
    // 删除
    handleDelete() {}
  }
}
</script>
<style lang="scss" scoped>

</style>
